
#ifndef _MEMBER_BLAYOUT_H_
#define _MEMBER_BLAYOUT_H_

#include <BStyle>
#include "ILayoutItem.h"

#define layout_member(layout)		((member_BLayout*)((BLayout*)layout)->_ptr)

namespace BWE
{
	class member_BLayout
	{
	public:
		member_BLayout(BLayout* layout);
		~member_BLayout();

		void setHost(BWidget* newHost);
		void dispenseUpperStyles(BLayout* upper);
		void dispenseStyles(BStyle* hostStyle, BEvent& event);
		void dispenseEvent(const BEvent& event);

		BLayout*		boss;
		BWidget*		host;
		PartFlag		part;
		BLayout*		parent;
		BMargin			margin;
		bool			visible;
		BStyleHolder	realStyle;
		ILayoutItem		item;

		bool			dirty;
		BSizePolicy		sizePolicy;
		BSize			fixedSize;
		BSize			minSize;
		BSize			maxSize;
		BRect			rect;

	};
}

#endif
